package views;

import models.ShortQuestion;
import mvc.AbstractView;
import mvc.IController;

public class ShortQView extends AbstractView
{

	public ShortQView(IController controller, ShortQuestion question)
	{
		super(controller);
		itsShortQuestion = question;
	}

	@Override
	public void onInputString(String str)
	{
	}

	@Override
	public void update()
	{
		System.out.println(itsShortQuestion.getCaption());
		if(itsShortQuestion.getItsIAnswer() != null && 
			itsShortQuestion.getPermission() == 0)
		{
			System.out.println("\nANSWER:\n" + itsShortQuestion.getItsIAnswer().getText());
		}
	}

	private ShortQuestion itsShortQuestion;
}
